import 'package:wanxiang_app/generated/json/base/json_field.dart';
import 'package:wanxiang_app/generated/json/sell_bean_entity.g.dart';
import 'dart:convert';
export 'package:wanxiang_app/generated/json/sell_bean_entity.g.dart';

@JsonSerializable()
class SellBeanEntity {
	late int code;
	late String msg;
	late SellBeanData data;

	SellBeanEntity();

	factory SellBeanEntity.fromJson(Map<String, dynamic> json) => $SellBeanEntityFromJson(json);

	Map<String, dynamic> toJson() => $SellBeanEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class SellBeanData {
	late int id;
	@JSONField(name: "is_self")
	late int isSelf;
	@JSONField(name: "img_url")
	late String imgUrl;
	@JSONField(name: "add_time")
	late String addTime;
	late String title;
	late String content;
	@JSONField(name: "category_text")
	late String categoryText;
	@JSONField(name: "sell_price")
	late String sellPrice;
	@JSONField(name: "is_msg")
	late int isMsg;
	@JSONField(name: "is_indulge")
	late int isIndulge;
	@JSONField(name: "is_shoucang")
	late bool isShoucang;
	@JSONField(name: "channel_name")
	late String channelName;
	@JSONField(name: "channel_id")
	late String channelId;
	@JSONField(name: "category_id")
	late String categoryId;
	@JSONField(name: "phone_number")
	late String phoneNumber;
	@JSONField(name: "wx_number")
	late String wxNumber;
	@JSONField(name: "qq_number")
	late String qqNumber;
	@JSONField(name: "account_source")
	late String accountSource;
	@JSONField(name: "is_bargain")
	late String isBargain;
	@JSONField(name: "game_account")
	late String gameAccount;
	late String fields;
	@JSONField(name: "good_guid")
	late String goodGuid;
	@JSONField(name: "good_name")
	late String goodName;
	late String status;
	@JSONField(name: "role_text")
	late String roleText;
	@JSONField(name: "sx_price")
	late String sxPrice;
	late List<SellBeanDataAlbums> albums;
	late List<SellBeanDataExtended> extended;
	late List<SellBeanDataCategory> category;

	SellBeanData();

	factory SellBeanData.fromJson(Map<String, dynamic> json) => $SellBeanDataFromJson(json);

	Map<String, dynamic> toJson() => $SellBeanDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class SellBeanDataAlbums {
	late int id;
	@JSONField(name: "original_path")
	late String originalPath;

	SellBeanDataAlbums();

	factory SellBeanDataAlbums.fromJson(Map<String, dynamic> json) => $SellBeanDataAlbumsFromJson(json);

	Map<String, dynamic> toJson() => $SellBeanDataAlbumsToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class SellBeanDataExtended {
	@JSONField(name: "control_type")
	late String controlType;
	late String name;
	late String title;
	@JSONField(name: "item_option")
	late String itemOption;

	SellBeanDataExtended();

	factory SellBeanDataExtended.fromJson(Map<String, dynamic> json) => $SellBeanDataExtendedFromJson(json);

	Map<String, dynamic> toJson() => $SellBeanDataExtendedToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class SellBeanDataCategory {
	late int id;
	late String title;
	@JSONField(name: "channel_id")
	late int channelId;
	@JSONField(name: "parent_id")
	late int parentId;

	SellBeanDataCategory();

	factory SellBeanDataCategory.fromJson(Map<String, dynamic> json) => $SellBeanDataCategoryFromJson(json);

	Map<String, dynamic> toJson() => $SellBeanDataCategoryToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}